#include "ViewCommon.h"
#define LOG_TAG "HMI"
#include "log_api.h"

void LoadWidgetWithName(ItuElement* element, const char* widgetName)
{
	if(element && !element->isVaild_)
	{
		element->widget_ = ituSceneFindWidget(&theScene, widgetName);
		if(element->widget_ == NULL)
		{
			element->isVaild_ = false;
		}
		else
		{
			element->isVaild_ = true;
		}
	}
	else
	{
		if(element->isVaild_)
		{
			LOG_I("info : %s already found\n", widgetName);
		}
		else
		{
			LOG_E("error : %s not find\n", widgetName);
		}
	}
}